<?php
defined('BASEPATH') or exit('No direct script access allowed');
?><!DOCTYPE html><html lang="en">
<head>
	<!--加载header文件-->
	<?php
	include_once 'public/views/header.php';
	?>
	<?php
	include_once 'public/home/html/laydate.php';
	include_once 'public/home/html/echarts.php';
	include_once 'public/home/html/select.php';
	?>
	<script src="public/append/layer/layer/layer.js"></script>
	<link rel="stylesheet" href="public/css/edit.css" />
	<link rel="stylesheet" href="cust/css/attendAdd.css" />
	<script src="public/home/js/function.js"></script>
	<script src="cust/js/attendAdd.js"></script>
	<script src="public/js/cus_modal.js"></script>
</head>
<style>
</style>
<body>
	<div class="container">
		<div class="row">
			<input type="hidden" value="<?php if(isset($_SESSION[SESS_ASSESS]['teacher_id'])) echo $_SESSION[SESS_ASSESS]['teacher_id'];?>" id="teacher_id" >
			<input type="hidden" id="modal_title" value="<?=$title?>" />
			<input type="hidden" id="modal_height" value="450" />
			<input type="hidden"name="class_id"value="<?php if(isset($class_id)){echo $class_id;}else{echo '0';}?>">
			<input type="hidden"  name="teacher_id" value="<?php if(isset($teacher_id)){ echo $teacher_code;}else{echo '0';}?>">

			<form id="editForm">
				<table class='edit_table'>
				
					<th colspan="4" class="th-title">
						<i class="icon-dashboard"></i>听课简要
					</th>
					<tr>
						<th class="required">学年</th>
						<td>
							<input type="text"  placeholder="请输入学年" name="attend2" id="attend2" readOnly value="<?php if(isset($attend))echo $attend['academic_year']; if(isset($class_detail['academic_year'])){echo $class_detail['academic_year'];}?>" dataType="*"/>
						</td>
						<th class="required">学期</th>
						<td>
							<input type="text" placeholder="请输入学期" id="attend3" name="attend3" readOnly value='<?php if(isset($attend))echo $attend['semester']; if(isset($class_detail['semester'])){echo $class_detail['semester'];}?>' dataType="*">
						</td>
					</tr>
					<tr>
							<input type="hidden" value="<?php echo $unlock;?>">
							<th class="required">授课教师</th>
							
							<td class='lock'>
								<input type="text" readOnly name="matter_source_caption" class="matter_source_caption1 " value="<?php echo estr($detail, 'matter_source_caption') ?>" >
								<input type="hidden" readOnly name="matter_source_id" class="matter_source_caption1 " value="<?php echo estr($detail, 'matter_source_id') ?>" >
							</td>
							
							<td class='unlock delselect'>
								<select name="matter_source_caption" class="matter_source_caption readonly_select" onchange="getUndertakeMatterByDept();" >
									<option value="0">请选择...</option>
									<?php foreach ($dept as $k => $v): ?>
									<option value="<?php echo $v ?>" <?php if(estr($detail, 'matter_source_caption')==$v) echo 'selected="selected"' ?>><?php echo $v ?></option>	
									<?php endforeach ?>
								</select>	
							</td>

						<!-- <th class="required">授课教师</th>
						<td>
							<input type="text" placeholder="请输入授课教师" id="teacher_name" onclick="gotoSearch()" name="teacher_name" value="<?php if(isset($_SESSION[SESS_ASSESS]['teacher_name'])){echo $_SESSION[SESS_ASSESS]['teacher_name'];}else if(isset($attend)){echo $attend['teacher_name'];} ?>" dataType="*">
							<input type="hidden"  id="teacher_code"  class="hide" name="teacher_code" value="<?php if(isset($_SESSION[SESS_ASSESS]['teacher_code'])){echo $_SESSION[SESS_ASSESS]['teacher_code']?$_SESSION[SESS_ASSESS]['teacher_code'] : '暂无工号';}else if(isset($attend)){echo $attend['teacher_code'];}?>" dataType="*">
						</td> -->
						
						<th class="required">教师所属单位</th>
						<td>
							<input type="text"  readOnly id="dept_name" name="dept_name" value="<?php if(isset($_SESSION[SESS_ASSESS]['dept_name'])){echo $_SESSION[SESS_ASSESS]['dept_name'];}else if(isset($attend)){echo $attend['dept_name'];} ?>" dataType="*">
						</td>
					</tr>
					<tr>
						<th class="required">教师职称</th>
						<td>
							<input type="text" name="title" readOnly id="teacher_title" value="<?php if(isset($_SESSION[SESS_ASSESS]['title'])){echo (new Title)->show($_SESSION[SESS_ASSESS]['title']);}else if(isset($attend['title'])){echo $attend['title'];} ?>" placeholder="请选择" dataType="*">
						</td>
						<th class="required">教师年龄</th>
						<td>
							<input type="text" name="age_groups" id='age_groups' readOnly value="<?php if(isset($_SESSION[SESS_ASSESS]['age'])){ echo $_SESSION[SESS_ASSESS]['age'];}else if(isset($attend['age_groups'])){echo $attend['age_groups'];} ?>" placeholder="请输入"  dataType="*">	
						</td>
					</tr>
					<tr>
						<th class="required">教师属性</th>
						<td>
							<input type="text"  readOnly id='teachers_attribute'name="teachers_attribute" value="<?php if(isset($_SESSION[SESS_ASSESS]['teachers_attribute'])){echo (new TeachersAttribute)->show(estr($_SESSION[SESS_ASSESS],'teachers_attribute'));}else if(isset($attend['teachers_attribute'])){echo $attend['teachers_attribute'];} ?>" placeholder="请选择">
						</td>
						<th class="required">课程名称</th>
						<td>
							<input type="text" placeholder="请输入课程名称" id="class_name" name="class_name"   value="<?php if(isset($_SESSION[SESS_ASSESS]['class_name'])){echo $_SESSION[SESS_ASSESS]['class_name'];}else if(isset($attend)){echo $attend['class_name'];}else ?>" onclick="gotoSearch1()"  oninput="checkClass()" readOnly unselectable="on" onfocus="this.blur()">
						</td>
					</tr>
					<tr>
						<th class="required">课程类型</th>
						<td>
							<input type="text" readOnly name="class_type" id="class_type"  value="<?php if(isset($_SESSION[SESS_ASSESS]['classtype'])){echo $_SESSION[SESS_ASSESS]['classtype'];}else if(isset($attend['class_type'])){echo $attend['class_type'];} ?>"  placeholder="请选择">
						</td>
						<th class="required">听课班级</th>
						<td>
							<input type="text" placeholder="请输入听课班级" class="form-control" id="attend4" name="attend4"  value="<?php if(isset($_SESSION[SESS_ASSESS]['classname'])){echo $_SESSION[SESS_ASSESS]['classname'];}else if(isset($attend)){echo $attend['listen_class'];}?>" oninput="checkClass()">
						</td>
					</tr>
					<tr>
						<th class="required">听课地址</th>
						<td>
							<input type="text"   placeholder="请输入听课地址" id="listen_address" name="listen_address" value="<?php if(isset($_SESSION[SESS_ASSESS]['classroom'])){echo $_SESSION[SESS_ASSESS]['classroom'];}else if(isset($attend)){echo $attend['listen_address'];}?>">
						</td>
						<th class="required">开课单位</th>
						<td>
							<input type="text"  placeholder="请输入开课单位" id="course_units" name="course_units" value="<?php if(isset($_SESSION[SESS_ASSESS]['course_units'])){echo $_SESSION[SESS_ASSESS]['course_units'];}else if(isset($attend)){echo $attend['course_units'];}?>">
						</td>
					</tr>
					
					<tr>
						<th class="required">听课时间</th>
						<td>
							<input type="text"  readOnly placeholder="请选择听课时间" id="listen_time" name="listen_time" value="<?php if(isset($attend['listen_time'])&&$attend['listen_time']!=null){echo date('Y-m-d H:i',$attend['listen_time']);}if(isset($class_detail['listen_time'])){echo date('Y-m-d H:i',$class_detail['listen_time']);}?>">
						</td>
						<th class="required">听课身份</th>
							<td>
								<input type="text" id='role' name="role" readOnly value="<?php if(isset($attend['type'])){echo (new AttendType)->show($attend['type']);} ?>" placeholder="请选择">
							</td>
					</tr>
					<th colspan="4" class="th-title">
						<i class="icon-dashboard"></i>教学水平
					</th>
					<tr>
						<th class="required">听课时间</th>
						<td>
							<input type="text" name="start_time" id="start_time" value="" dataType="*"/>
						</td>
						<th class="required">听课身份</th>
							<td>
								<input type="text" name="end_time" id="end_time" value="" dataType="*"/>
							</td>
					</tr>


					<th colspan="4" class="th-title">
						<i class="icon-dashboard"></i>教学效果
					</th>

					<tr>
						<th class="required">听课时间</th>
						<td>
							<input type="text" name="start_time" id="start_time" value="" dataType="*"/>
						</td>
						<th class="required">听课身份</th>
							<td>
								<input type="text" name="end_time" id="end_time" value="" dataType="*"/>
							</td>
					</tr>

					<th colspan="4" class="th-title">
						<i class="icon-dashboard"></i>其他
					</th>

					<tr>
						<th class="required">听课时间</th>
						<td>
							<input type="text" name="start_time" id="start_time" value="" dataType="*"/>
						</td>
						<th class="required">听课身份</th>
							<td>
								<input type="text" name="end_time" id="end_time" value="" dataType="*"/>
							</td>
					</tr>

					<th colspan="4" class="th-title">
						<i class="icon-dashboard"></i>完成
					</th>

					<tr>
						<th class="required">听课时间</th>
						<td>
							<input type="text" name="start_time" id="start_time" value="" dataType="*"/>
						</td>
						<th class="required">听课身份</th>
							<td>
								<input type="text" name="end_time" id="end_time" value="" dataType="*"/>
							</td>
					</tr>


					<th colspan="4" class="th-title">
						<i class="icon-dashboard"></i>听课内容
					</th>
					<tr>
						<th class="required">时间</th>
						<td colspan="3">
							<input type="text" name="attend_record_time" id="recordid1" value="<?php if(isset($attend_record) && $attend_record!=null){echo $attend_record[0]['time'];} ?>" dataType="*"/>
						</td>				
					</tr>
					<tr>
						<th class="required">听课记录(可添加附件)</th>
						<td colspan="3">
							<textarea rows="5" name="check_in_info" id="check_in_info"  dataType="*"><?php if(isset($_SESSION[SESS_ASSESS]['record'])){echo $_SESSION[SESS_ASSESS]['record'];}else if($attend_record!=null){echo $attend_record[0]['commentary'];}?></textarea>
						</td>
					</tr>
					<tr>
						<th class="required">意见或建议</th>
						<td colspan="3">
							<textarea rows="5" name="check_in_info" id="check_in_info"  dataType="*"><?php if(isset($_SESSION[SESS_ASSESS]['advice'])){echo $_SESSION[SESS_ASSESS]['advice'];}else if(isset($attend)){echo $attend['advice'];} ?></textarea>
						</td>
					</tr>

					<tr>
						<th class="required">附件</th>
						<td colspan="3">
							<input type="hidden" name="img_id" id="img_id"  value="" dataType="*"/>
							<img src="cust/images/upload.png" id="img" onclick="$(this).next().click();" >							
							<input type="file" id="upload_img" class="hide">
						</td>
					</tr>


				</table>
			</form>
		</div>
	</div>
</body>


</html>
